package com.hst.capacity.infra.persistence.jpa.franchisee.finance;


import com.hst.capacity.domain.model.entity.franchisee.customer.CustomerFranchiseeEntity;
import com.hst.capacity.domain.model.entity.franchisee.finance.FinanceFranchiseeEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface FinanceFranchiseeRepository extends JpaRepository<FinanceFranchiseeEntity, String> {

    @Query("select t from FinanceFranchiseeEntity t where t.idFinance = ?1 and t.status = 1")
    List<FinanceFranchiseeEntity> findByIdFinance(String idFinance);

    List<FinanceFranchiseeEntity> findByIdFinanceAndStatus(String idFinance, int status);

}
